package ninth.线程操作案例.程序的基本实现;
//定义

public class Consumer implements Runnable{
    private Info info = null;
public Consumer(Info info){
    this.info=info;
}
    @Override
    public void run() {
        for (int i = 0; i <50 ; i++) {
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(this.info.getName() + " --> " + this.info.getContent()); // 取出信息
        }
    }
}
